/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vk.message.gui.activities;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TabHost;
import vk.message.R;
import vk.message.gui.component.TabButtonFactory;

/**
 *
 * @author 4ui
 */
public class Contacts extends TabActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.contacts);
        
        TabHost tabHost = getTabHost();
        TabHost.TabSpec tabSpec;
        Intent intent;


        View view = TabButtonFactory.getTopTabButton(getApplicationContext(), "Друзья");
        intent = new Intent().setClass(this, Friends.class);
        tabSpec = tabHost.newTabSpec("friends").setIndicator(view).setContent(intent);
        tabHost.addTab(tabSpec);

        view = TabButtonFactory.getTopTabButton(getApplicationContext(), "Онлайн");
        intent = new Intent().setClass(this, Online.class);
        tabSpec = tabHost.newTabSpec("online").setIndicator(view).setContent(intent);
        tabHost.addTab(tabSpec);

        view = TabButtonFactory.getTopTabButton(getApplicationContext(), "Контакты");
        intent = new Intent().setClass(this, PhoneNumbers.class);
        tabSpec = tabHost.newTabSpec("contacts").setIndicator(view).setContent(intent);
        tabHost.addTab(tabSpec);

        tabHost.setCurrentTab(0);
    }
}
